<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="../layuiadmin/style/wu.css" media="all">
    <link rel="stylesheet" href="../layuiadmin/style/template.css" media="all">
    <title></title>
    <style>
        .layui-laydate-range {
            width: 547px !important;
        }
    </style>
</head>

<body>
    <div class="layui-fluid">
        <form class="layui-card layui-form" style="padding: 10px;">
            <div class="layui-form-item">
                <label class="layui-form-label">部门领导</label>
                <div class="layui-input-block">
                    <select name="teach" cr-monitor="teachMonitor" lay-search lay-filter="teachFilter" cr-join=" " cr-title="卡号 姓名" cr-value="卡号 姓名" cr-api="Common/GetTeachers" class="layui-select">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">部门名称</label>
                <div class="layui-input-block">
                    <select name="departments" cr-monitor="departments" lay-search lay-filter="departments" cr-title="部门名称" cr-value="部门名称" cr-api="Common/GetDepartments" class="layui-select">
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">文件下载</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="isDownload" lay-skin="switch">
                </div>
            </div>
        </form>
    </div>
</body>
<script src="../js/tool/sweetalert.js"></script>
<script src="../layuiadmin/layui/layui.min.js"></script>
<script>
    var $ = '';
    layui.config({
        base: '../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['form', 'crSelect', 'index'], function () {
        var form = layui.form, crSelect = layui.crSelect;
        $ = layui.$;

        crSelect({ // 文件类型限制
            base: "../../",
            monitor: "teachMonitor"
        })

        crSelect({
            base: "../../",
            monitor: "departments"
        })
    });

    function getResult() {
        return {
            KH: $("select[name=teach]").val() && $("select[name=teach]").val().split(" ")[0] || "",
            XM: $("select[name=teach]").val() && $("select[name=teach]").val().split(" ")[1] || "",
            BMMC: $("select[name=departments]").val(),
            SFXZ: $("input[name=isDownload]:checked").val() ? "是" : "否"
        }
    }
</script>

</html>